package com.cloud.feign.configure;

import com.cloud.feign.bean.User;
import com.cloud.feign.service.FeignClient1;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * @program: springcloud-example
 * @description: 程序出现问题，熔断器指定返回事件
 * @author: Mr.Zou
 * @create: 2019-12-23 16:01
 **/
@Slf4j
@Component
public class SchedualServiceHiHystric implements FeignClient1 {

    @Override
    public String sayHiFromClientOne(String name) {
        return "sorry " + name;
    }

    @Override
    public User getUser(User user) {
        return new User(0, "失败了");
    }

    @Override
    public List<User> getList() {
        log.info("请求失败！！！！！！！！");
        return new ArrayList<>();
    }

}


